/**
 * 此类暂时废弃
 * 2014-01-10
 */
var StartLayer = cc.Layer.extend({
	_util: new Util(),
    init: function(){
        var bRet = false;
        if (this._super()) {
            var node = this._util.newLayerFromCCB(s_logo_ccbi, this);
            
            if (node != null) {
                this.addChild(node);
            }
            
            //            this.runAction(cc.Sequence.create(cc.DelayTime.create(2), cc.CallFunc.create(this.onNewGame, this)));
            this._util.ccbReader.getAnimationManager().setCompletedAnimationCallback(this, this.onNewGame);
            bRet = true;
        }
        return bRet;
    },
    onNewGame: function(){
        cc.log("init new game")
        sound.playBGM();
        var scene = cc.Scene.create();
        scene.addChild(MainMenuLayer.create());
        cc.Director.getInstance().replaceScene(cc.TransitionFade.create(0.6, scene));
    }
});

StartLayer.create = function(){
    var sl = new StartLayer();
    if (sl && sl.init()) {
        return sl;
    }
    return null;
}

StartLayer.scene = function(){
    var scene = cc.Scene.create();
    var layer = StartLayer.create();
    scene.addChild(layer);
    return scene;
}
